package com.demo.mybatis;

import com.demo.mybatis.mappers.MybatisSqlSessionFactory;
import com.demo.mybatis.entity.book_list;
import com.google.gson.Gson;
import org.apache.ibatis.session.SqlSession;

import java.util.List;

/**
 * Created by liwei.b on 2016/12/6.
 */
public class main {
    public static void main(String args[]) {
        SqlSession session = MybatisSqlSessionFactory.getSession();
//        book_list book_listList = session.selectOne("book_list.mapper.getById", 1);

        List<book_list > book_listLists = session.selectList("book_list.mapper.getAll");

        System.out.println(new Gson().toJson(book_listLists));
    }
}
